home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-05-03 | 5.8 KB | 288 lines | [TEXT/MPS ] |
- /* -----------------------------------------------------------------------------
-
- FILENAME
- OldApp.r
-
- DESCRIPTION
- Contains resource descriptions for old-application compatibility.
-
- COPYRIGHT
- Copyright © 1995 Apple Computer, Inc.
- All rights reserved.
-
- Modification history
- 05/03/95 - Dave Hersey - Version 1.0.1 to fix some minor bugs in
- CustomBufferingAndIO.c.
-
- 01/14/95 - Dave Hersey - Created from the shell of a hollowed-out
- ImageWriter driver.
-
- NOTE: Relevant goodies are listed in MPW's "Mark" menu.
-
- -------------------------------------------------------------------------------- */
-
- #include "Types.r"
- #include "SysTypes.r"
- #include "PrintingResTypes.r"
- #include "CommonDefines.h"
-
-
- // This resource allows us to customize the old API's behavior - all drivers
- // should have a resource of this type
-
- resource gxCustType (gxCustID, sysheap, purgeable)
- {
- 72, 72, // our best DPI
- defaultUpDriver, // we use the default up driver
- {1, 1}, // pattern stretch of 2
- gxOptimizedTranslation + gxRasterTargetTranslation
- };
-
-
- // PrGeneral resolution resource. We only support 72 dpi.
-
- resource gxReslType (gxReslID, sysheap, purgeable)
- {
- rangeType,
- gxDiscreteResolution, gxDiscreteResolution,
- gxDiscreteResolution, gxDiscreteResolution,
- {
- 72, 72;
- }
- };
-
-
- // Overrides for old application messages, and where to find them in the jump
- // table.
-
- #define firstOffset 4
- #define segmentID OldSegID
-
- resource gxOverrideType (gxDriverCompatibilityOverrideID, sysheap, purgeable)
- {
- {
- gxConvertPrintRecordTo, segmentID, firstOffset,
- gxConvertPrintRecordFrom, segmentID, firstOffset + 4,
- gxPrValidate, segmentID, firstOffset + 8
- };
- };
-
-
- // Page Setup dialog
-
- resource 'dctb' (-8192, sysheap, purgeable) {
- { /* array ColorSpec: 0 elements */
- }
- };
-
- resource 'DLOG' (-8192, sysheap, purgeable) {
- {30, 20, 174, 492},
- dBoxProc,
- invisible,
- noGoAway,
- 0x1,
- -8192,
- "Stl",
- noAutoCenter
- };
-
- resource 'DITL' (-8192, sysheap, purgeable) {
- { /* array DITLarray: 18 elements */
- /* [1] */
- {8, 404, 27, 464},
- Button { enabled, "OK" },
-
- /* [2] */
- {35, 404, 54, 464},
- Button { enabled, "Cancel" },
-
- /* [3] name frill */
- {4, 4, 20, 384},
- StaticText { disabled, DriverName },
-
- /* [4] line frill */
- {20, 4, 24, 393},
- UserItem { disabled },
-
- /* [5] */
- {24, 4, 40, 60},
- StaticText { disabled, "Paper:" },
-
- /* [6] */
- {24, 68, 40, 208},
- RadioButton { enabled, "¿" },
-
- /* [7] */
- {24, 218, 40, 383},
- RadioButton { enabled, "¿" },
-
- /* [8] */
- {39, 68, 55, 208},
- RadioButton { enabled, "¿" },
-
- /* [9] */
- {39, 218, 55, 383},
- RadioButton { enabled, "¿" },
-
- /* [10] */
- {54, 68, 70, 208},
- RadioButton { enabled, "¿" },
-
- /* [11] */
- {54, 218, 70, 383},
- RadioButton { enabled, "¿" },
-
- /* [12] */
- {74, 4, 90, 88},
- StaticText { disabled, "Orientation" },
-
- /* [13] portrait icon */
- {93, 5, 125, 37},
- UserItem { enabled },
-
- /* [14] landscape icon */
- {93, 45, 125, 77},
- UserItem { enabled },
-
- /* [15] version frill */
- {4, 348, 19, 384},
- UserItem { enabled },
-
- /* [16] default frill */
- {4, 400, 24, 460},
- UserItem { enabled },
- }
- };
-
- // Page Setup dialog dctl
- resource 'dctl' (-8192, sysheap, purgeable) {
- 16,
- {
- Button { 2, cancel },
- Frill { 4, line },
- PaperSizes { 0, 0, { 6, 7, 8, 9, 10, 11 } },
- Orientation { 13, 14, 0, 0 },
- Frill { 15, version },
- Frill { 16, default },
- }
- };
-
- // Version string for old dialogs
- resource 'STR ' (-8190, sysheap, purgeable) { "1.0.1" };
-
-
- // Print Dialog
-
- resource 'dctb' (-8191, sysheap, purgeable) {
- { /* array ColorSpec: 0 elements */
- }
- };
-
- resource 'DLOG' (-8191, sysheap, purgeable) {
- {50, 20, 154, 492},
- dBoxProc,
- invisible,
- noGoAway,
- 0x1,
- -8191,
- "Job",
- noAutoCenter
- };
-
- resource 'DITL' (-8191, sysheap, purgeable) {
- { /* array DITLarray: 19 elements */
- /* [1] */
- {8, 404, 27, 464},
- Button { enabled, "Print" },
-
- /* [2] */
- {35, 404, 54, 464},
- Button { enabled, "Cancel" },
-
- /* [3] name frill */
- {4, 4, 20, 384},
- StaticText { disabled, DriverName },
-
- /* [4] line frill */
- {20, 5, 24, 393},
- UserItem { disabled },
-
- /* [5] */
- {44, 4, 60, 88},
- StaticText { disabled, "Page Range:" },
-
- /* [6] */
- {44, 100, 60, 188},
- RadioButton { enabled, "All" },
-
- /* [7] */
- {44, 200, 60, 260},
- RadioButton { enabled, "From:" },
-
- /* [8] */
- {44, 264, 60, 296},
- EditText { disabled, "" },
-
- /* [9] */
- {44, 304, 60, 332},
- StaticText { disabled, "To:" },
-
- /* [10] */
- {44, 332, 60, 364},
- EditText { disabled, "" },
-
- /* [11] */
- {64, 4, 80, 88},
- StaticText { disabled, "Copies:" },
-
- /* [12] */
- {64, 100, 80, 132},
- EditText { disabled, "1" },
-
- /* [13] version frill */
- {4, 348, 19, 384},
- UserItem { enabled },
-
- /* [14] default frill */
- {4, 400, 24, 460},
- UserItem { enabled }
- }
- };
-
- // Print dialog dctl
- resource 'dctl' (-8191, sysheap, purgeable) {
- 14,
- {
- Button { 2, cancel },
- Frill { 4, line },
- PageRange { 6, 7, 8, 10},
- Copies { 12 },
- Frill { 13, version },
- Frill { 14, default },
- }
- };
-
-
- // Our driver's default print record for old apps. This is
- // loaded by the default implementation of gxPrintDefault.
-
- data 'PREC' (0, sysheap, purgeable) {
- $"000C" // print record version
- $"0000" // iDev
- $"0048 0048" // horizontal and vertical resolution
- $"0000 0000 02F0 0280" // rPage
- $"FFDC FFEC 02F4 0294" // rPaper
- $"8804" // wDev = 0x88, 0x04 == Portrait
-
- // Misc. values follow. We use the same as the IW.
- $"0528 03FC 0001"
- $"0000" // iDev
- $"0048 0048" // horizontal and vertical resolution
-
- // More misc. settings follow. We use the same as the IW.
- $"0000 0000 02F0 0280 0050 0020 0280 0C80 0018 0001 0101 0000"
- $"0001 270F 0001 0101 0000 0000 0000 0000 0000 0000 0000 0000"
- $"0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000"
- };
-